package io.renren.service.impl;

import io.renren.entity.dto.GradeSubjectDto;
import io.renren.entity.vo.GradeSubject4Web;
import io.renren.utils.ConfigConstant;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import io.renren.dao.GradeSubjectDao;
import io.renren.entity.GradeSubject;
import io.renren.service.GradeSubjectService;


@Service("gradeSubjectService")
public class GradeSubjectServiceImpl implements GradeSubjectService {
    @Resource
    private GradeSubjectDao gradeSubjectDao;

    @Override
    public GradeSubject queryObject(Long id) {
        return gradeSubjectDao.queryObject(id);
    }

    @Override
    public List<GradeSubject> queryList(Map<String, Object> map) {
        return gradeSubjectDao.queryList(map);
    }

    @Override
    public List<GradeSubject4Web> queryList4web() {
        return gradeSubjectDao.queryList4web();
    }

    @Override
    public List<GradeSubjectDto> querySubjectList(Long gradeId) {
        return gradeSubjectDao.querySubjectList(gradeId, Long.parseLong(ConfigConstant.DEFAULT_SEASON_ID));
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return gradeSubjectDao.queryTotal(map);
    }

    @Override
    public void save(GradeSubject gradeSubject) {
            gradeSubjectDao.save(gradeSubject);
    }

    @Override
    public void update(GradeSubject gradeSubject) {
            gradeSubjectDao.update(gradeSubject);
    }

    @Override
    public void delete(Long id) {
            gradeSubjectDao.delete(id);
    }

    @Override
    public void deleteBatch(Long[]ids) {
            gradeSubjectDao.deleteBatch(ids);
    }

}
